Prizm Content Connect
Redaction Creator

POST /RedactionCreator

Creates and starts a new RedactionCreator.

A RedactionCreator represents a process that runs on the server which searches a document for text matching a Regular Expression then, based on any matches, creates a new Markup XML document containing redaction markup. The redaction Markup XML that is created by this process can be used with the Markup Burner API to "burn" the redactions into a document.

The server process to create the redaction markup is started by this request, but a response is sent before the process is complete. Use the GET /RedactionCreator/{id} API below to get the state and results of an in-progress or completed RedactionCreator process.

There are two required inputs to create a RedactionCreator:

See the Work File API topic for more information about a WorkFile.

A new Markup XML document will be created that will contain the redaction markup. The new document will be made available by a new WorkFile ID.

By default, RedactionCreator objects will be automatically deleted 20 minutes after they are created.

Http Method

POST

Request Headers

Name Value Details
Accusoft-Affinity-Token

Affinity token returned in post response body for work file specified by input.documentFileId parameter in request body.

Example: "rcqmuB9pAa8+4V7fhO1SXzawy/YMQU1g8lLdNDe5l7w="

Only required if PCC is running in multi-server mode.

Parameters

None

Request Body

In the request body, provide JSON containing the following properties:

Name

Description

Details

input.documentFileId  

 

The ID of the WorkFile that represents the source document whose text will be searched. This document will not be modified.

string, required

Example: ek5Zb123oYHSUEVx1bUrVQ

input.autoRedactionRegularExpressions

The Regular Expressions to match within the source document text.

Multiple Regular Expressions provided in the array will be concatenated into a single Regular Expression using the format: "(regex1)|(regex2)…|(regexN)"

array, required

Example: ["regex1", "regex2"]

minSecondsAvailable

The minimum number of seconds which this RedactionCreator must remain available. If not provided, a configurable default value is used. This value is ignored if it is shorter than the configurable value.

integer, optional

Example: 60

Response Body

If successful, this method returns JSON containing the following properties:

Name

Description

Details

input.documentFileId  

 

The ID of the WorkFile that represents the source document whose text will be searched. This document will not be modified. This is an echo of what was passed in by the request.

string

Example: ek5Zb123oYHSUEVx1bUrVQ

input.autoRedactionRegularExpressions

The Regular Expressions to match within the source document text. This is an echo of what was passed in by the request.

array

Example: ["[0-9]{3}[-]?[0-9]{2}[-]?[0-9]{4}"]

expirationDateTime

The date and time (in ISO 8601 Extended Format) when the RedactionCreator will be deleted.

string

Example: "2014-05-13T20:38:39.796Z"

processId

The ID of the RedactionCreator.

string

Example: ElkNzWtrUJp4rXI5YnLUgw

state

The current state of the redaction creation process running on the server.

This will always be "processing" in this response.

string ("processing" | "complete" | "error" )

Example: "processing"

percentComplete

The percentage (0 – 100) complete of the redaction creation process.

This will always be 0 in this response.

integer

Example: 0

errorCode

An error code string if a problem occurred during the redaction creation process.

This will always be null in this response.

string

Example: null

output.markupFileId

The ID of the new WorkFile that represents the new redaction markup XML.

This will always be null in this response.

string

affiityToken Affinity token echoed from request header. This value will only be present if PCC is running in multi-server mode.

string

Example: "rcqmuB9pAa8+4V7fhO1SXzawy/YMQU1g8lLdNDe5l7w="

Status Codes

Examples

Example Request
Copy Code
POST http://localhost:18681/PCCIS/V1/RedactionCreator
Content-Type: application/json
{
    "input": {
        "documentFileId": "ek5Zb123oYHSUEVx1bUrVQ",
        "autoRedactionRegularExpressions": [
            "[0-9]{3}[-]?[0-9]{2}[-]?[0-9]{4}"
        ]
    },
    "minSecondsAvailable": 60
}

 

Example Response
Copy Code
200 OK
Content-Type: application/json
{
    "input": {
        "documentFileId": "ek5Zb123oYHSUEVx1bUrVQ",
        "autoRedactionRegularExpressions": [
            "[0-9]{3}[-]?[0-9]{2}[-]?[0-9]{4}"
        ]
    },
    "expirationDateTime": "2014-12-17T20:38:39.796Z",
    "processId": "ElkNzWtrUJp4rXI5YnLUgw",
    "state": "processing",
    "percentComplete": 0,
    "errorCode": null,
    "output": null
}

GET /RedactionCreator/{RedactionCreatorId}

Gets the state and result of an existing RedactionCreator.

Requests can be sent to thus URL repeatedly while state is "processing".

When state is "complete", the new markup XML document containing redactions will be made available by a new WorkFile ID in the output.markupFileId. See the Work File API topic to find out how to download a WorkFile.

If the markup burning process encountered an error, the state property will be "error", the errorCode property will contain an error code string and output will be null.

Http Method

GET

Request Headers

 

Name Value Details
Accusoft-Affinity-Token

Affinity token returned in post response body for redaction creator specified by RedactionCreatorId parameter in URI.

Example: "rcqmuB9pAa8+4V7fhO1SXzawy/YMQU1g8lLdNDe5l7w="

Only required if PCC is running in multi-server mode.

 

Parameters

Name

Description

Details

RedactionCreatorId    

 

The ID of the RedactionCreator.

string, required

Example: ElkNzWtrUJp4rXI5YnLUgw

Request Body

None

Response Body

If successful, this method returns JSON containing the following properties:

Name

Description

Details

input.documentFileId  

 

The ID of the WorkFile that represents the source document whose text will be searched. This document will not be modified.

string

Example: ek5Zb123oYHSUEVx1bUrVQ

input.autoRedactionRegularExpressions

The Regular Expressions to match within the source document text.

array

Example: ["[0-9]{3}[-]?[0-9]{2}[-]?[0-9]{4}"]

expirationDateTime

The date and time (in ISO 8601 Extended Format) when the MarkupBurner will be deleted.

string

Example: "2014-05-13T20:38:39.796Z"

processId

The ID of the RedactionCreator.

string

Example: ElkNzWtrUJp4rXI5YnLUgw

state

The current state of the redaction creation process running on the server.

string ("processing" | "complete" | "error" )

Example: "complete"

percentComplete

The percentage (0 – 100) complete of the markup burning process.

Note: At time of writing, the percent complete will only ever be 0 or 100.

integer

Example: 100

errorCode

An error code string if a problem occurred during the redaction creation process.

string

Example: "DocumentFileIdDoesNotExist"

output.markupFileId

The ID of the new WorkFile that represents a new Markup XML document specifying the redactions.

string

Example: vry3FPE0zQqYwhzndRccOQ

affinityToken Affinity token echoed from request header. This value will only be present if PCC is running in multi-server mode.

string

Example: "rcqmuB9pAa8+4V7fhO1SXzawy/YMQU1g8lLdNDe5l7w="

Status Codes

Error Codes

Examples

Example Request
Copy Code
GET http://localhost:18681/PCCIS/V1/RedactionCreator/ElkNzWtrUJp4rXI5YnLUgw

 

Example Response
Copy Code
200 OK
Content-Type: application/json
{
    "input": {
        "documentFileId": "ek5Zb123oYHSUEVx1bUrVQ",
        "autoRedactionRegularExpressions": [
            "[0-9]{3}[-]?[0-9]{2}[-]?[0-9]{4}"
        ]
    },
    "expirationDateTime": "2014-12-17T20:38:39.796Z",
    "processId": "ElkNzWtrUJp4rXI5YnLUgw",
    "state": "complete",
    "percentComplete": 100,
    "errorCode": null,
    "output": {
        "markupFileId": "vry3FPE0zQqYwhzndRccOQ"
    },
}

 

 

 


©2015. Accusoft Corporation. All Rights Reserved.

Send Feedback